Skip to content

feat: add project working copies (clone agents)#100

Merged
Dimillian merged 31 commits intoDimillian:mainfrom
ratulsarna:feature/project-clone-working-copies
Jan 19, 2026
Merged

feat: add project working copies (clone agents)#100
Dimillian merged 31 commits intoDimillian:mainfrom
ratulsarna:feature/project-clone-working-copies

Conversation

@ratulsarna
Copy link
Contributor

This adds a "clone agent" workflow so a project can have multiple independent working copies (separate git clones) as sibling directories, without forcing users to move existing repos.

What’s included

  • Backend add_clone command: git clone into a chosen copies folder, inherit the project group, spawn an app-server session, and persist the workspace.
  • Settings: per-project copiesFolder stored on WorkspaceGroup and editable in the Settings UI.
  • UI: "New clone agent" action + modal to pick copy name and copies folder (with a suggested path + copy-to-clipboard).

Quality / safety fixes in this series

  • Prevent double-submit via Enter while cloning.
  • Prevent closing clone/worktree modals via backdrop/Escape while busy.
  • Roll back and clean up if clone session spawn or persistence fails (including killing spawned session).
  • Use async tokio::fs::remove_dir_all in async cleanup paths.
  • Improve long-path usability in the modal (horizontal caret navigation) while hiding scrollbars.
  • Speed up thread list matching for new workspaces by normalizing cwd paths and using a larger page size.

Testing

  • npm run lint
  • npm run typecheck
  • cargo test (in src-tauri/)

Notes

  • Existing worktree agents continue to work; clones introduce additional main workspaces.

@ratulsarna
Copy link
Contributor Author

ratulsarna commented Jan 18, 2026

Needs improvement

@ratulsarna ratulsarna closed this Jan 18, 2026
…ne-working-copies

# Conflicts:
#	src/features/threads/hooks/useThreads.ts
Create a .codexmonitor home for new clone workspaces so thread history loads consistently (and worktrees created from clones inherit the same home). Also revert the temporary thread/list page size bump now that path matching is normalized.
@ratulsarna
Copy link
Contributor Author

Needed some polish and testing. Re-opening now.

@ratulsarna ratulsarna reopened this Jan 19, 2026
@Dimillian
Copy link
Owner

@codex review

@Dimillian Dimillian changed the title Add project working copies (clone agents) feat: add project working copies (clone agents) Jan 19, 2026
@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. You're on a roll.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…ne-working-copies

# Conflicts:
#	src/App.tsx
…pies' into feature/project-clone-working-copies
@ratulsarna
Copy link
Contributor Author

There is currently a regression introduced in this PR that adds a .codexmonitor/ dir in the clones, working on fixing that.

Stop creating .codexmonitor inside clone workspaces (it shows up as untracked changes in git).
Limit thread/list scanning when a workspace has no known activity so newly created clones don't take forever to populate.
@ratulsarna
Copy link
Contributor Author

Fixed now, please re-review.

@Dimillian
Copy link
Owner

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 31009ddc1b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Dimillian Dimillian merged commit 6d94f0d into Dimillian:main Jan 19, 2026
gersmann pushed a commit to gersmann/codex-monitor-web that referenced this pull request Mar 10, 2026
Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants